package com.lucker.common.enums;

import com.lucker.common.util.StringUtil;

public enum BetPlanStatus {

	runing("runing","进行中"),
	lucker("lucker","已中奖"),
    no_lucker("no_lucker","未中奖"),
    canel("canel","取消")
    ;
	
	
	private String code;
    private String desc;
    
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }

    private BetPlanStatus(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    
    
    public static String getDescByCode(String code) {
    	
    	for (BetPlanStatus s : BetPlanStatus.values()) {
			if(StringUtil.equals(s.getCode(), code)) {
				return s.getDesc();
			}
        }
    	return null;
    }
    
}
